# 编写一个Python程序，来计算给定文本中每个单词出现的次数

txt = """
Python is a popular programming language. It is widely used for web development, data science, and more.
Python has a simple and readable syntax, which makes it great for beginners.
"""


def word_count():
    words = txt.lower().split()
    count = {}
    for word in words:
        word = word.strip(".,!?")
        if word in count:
            count[word] += 1
        else:
            count[word] = 1

    print(count)


word_count()